/*
 * BSM6.0
 *
 * Copyright 2012-2013 (C) SINODATA CO., LTD. All Rights Reserved.
 */
package com.sinodata.bsm.cicp.finder;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

/**
 * <p>
 * Description: 该程序是用于发现哪些不需要sql查询的资源类
 * 即返回的值只有固定的3个：资源唯一标示，资源名称，资源描述
 * </p>
 *
 * @author wangpeng
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2012-6-15 上午10:20:14          wangpeng        1.0         To create
 * </p>
 *
 * @since 
 * @see     
 */
public class NotSqlFinder extends Finder {
    private static final Logger logger = Logger.getLogger(NotSqlFinder.class);

    @SuppressWarnings("rawtypes")
    @Override
    public List<String[]> find(String ip, Map params) {
        String id = (String) params.get("ID");
        if (id == null) {
            logger.error("ITLID should not be null.");
            return null;
        }
        String name = (String) params.get("NAME");
        if (name == null) {
            logger.error("NAME should not be null.");
            return null;
        }
        String desc = (String) params.get("DESC");
        if (desc == null) {
            logger.error("DESC should not be null.");
            return null;
        }
        List<String[]> list = new ArrayList<String[]>();
        list.add(new String[] { id, name, desc });
        return list;
    }
}
